<script lang="ts">
import {defineComponent, PropType} from 'vue'
interface List {
  username:string
  age:number
}


export default defineComponent({
  name: "02_head",
  props:{
    count:[Number,String],
    list:Object as PropType<List[]>
  },
  //emits:['get-data'],
  emits:{
    //限定payload string类型
    'get-data'(payload:string){
      return payload.length > 0
    }
  },
  mounted(): any {
    this.$emit('get-data', 'hello emit')
  }
})
</script>

<template>
  <div>
    head
  </div>
</template>

<style scoped>

</style>